<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@include file="/common/taglibs.jsp"%>

<%@ page import="com.javapandeng.analys.VisitorCounter" %>
<%
    //訪問量

    int visitCount = Integer.parseInt(VisitorCounter.readCount("F:/visitCount.txt"));
    int newlist = Integer.parseInt(VisitorCounter.readCount("F:/newlist.txt"));
    int messageList = Integer.parseInt(VisitorCounter.readCount("F:/messageList.txt"));
    int uLogin = Integer.parseInt(VisitorCounter.readCount("F:/uLogin.txt"));
    int res = Integer.parseInt(VisitorCounter.readCount("F:/res.txt"));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
   <title>后台管理中心</title>  
    <script src="${ctx}/resource/js/jquery.js"></script>
    <link rel="stylesheet" type="text/css" href="${ctx}/resource/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/resource/css/main.css"/>
     <script type="text/javascript" src="${ctx}/resource/ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="${ctx}/resource/ueditor/ueditor.all.min.js"></script>
    <link rel="stylesheet" href="${ctx}/resource/css/reset.css" />
	<link rel="stylesheet" href="${ctx}/resource/css/style.css" />
	<script src="${ctx}/resource/js/Ecalendar.jquery.min.js"></script>
	
	<script src="${ctx }/resource/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${ctx}/resource/js/echarts.min.js"></script>
<script type="text/javascript" src="${ctx}/resource/js/macarons.js"></script>
</head>
<body>
    <div class="">
        <div class="result-wrap">
            <div class="if_sy_tongyongkuai_cont" id="thscfx" style="height:360px;"></div>
        </div>
    </div>
</body>
<script type="text/javascript">
var myChartFjHf3 = echarts.init(document.getElementById('thscfx'));
var optionFjHf3 = {
        backgroundColor: '#ffffff',
        title: {
            text: '商城页面访问数量情况',
            top: '7%',
            textStyle: {fontSize: 14},
            left: '43%'
        },
        color: ['#3398DB'],
        tooltip: {
            trigger: 'axis',
            axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: [
            {
                type: 'category',
                axisLabel: {
                    //横坐标上的文字换行显示 begin
                    formatter: function (val) {
                        return val.split("").join("\n");
                    }
                    //横坐标上的文字换行显示 end
                },
                data: ["首页访问量","公告访问量","留言访问量","登入页面访问量","注册页面访问量"],
                axisTick: {
                    alignWithLabel: true
                }
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '销售量',
                type: 'bar',
                barWidth: '60%',
                clickable: false,//绑定点击事件
                data: [
                        <%=visitCount%>,<%=newlist%>,<%=messageList%>,<%=uLogin%>,<%=res%>
              ]
            }
        ]
    };


myChartFjHf3.setOption(optionFjHf3);

</script>
</html>